package org.example;

import java.util.ArrayList;

public class ArryUtil {
    /*私有化构造方法*/
    private ArryUtil() {
    }

    /*获取最大值*/
    public static int getMax(ArrayList<Student> list) {
        int Max = list.get(0).getAge();
        for (int i = 1; i < list.size(); i++) {
            Student peo = list.get(i);
            if (Max < peo.getAge()) {
                Max = peo.getAge();
            }
        }
        return Max;
    }




}
